package com.qianlima.upload.common.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @description: 上传文件请求对象
 * @author：allms
 * @date: 2023/3/21 14:43
 */
@Data
@Accessors(chain = true)
@ApiModel("分片上传DTO")
public class FileReqDto {

    /**
     * 文件名
     */
    @ApiModelProperty(value = "文件名", example = "我卢本伟没有开挂", required = true)
    private String name;

    /**
     * 后缀
     */
    @ApiModelProperty(value = "文件后缀", example = "JPG", required = true)
    private String suffix;

    /**
     * 大小|字节B
     */
    @ApiModelProperty(value = "文件大小，单位字节B", example = "2024", required = true)
    private Long size;

    @ApiModelProperty(value = "分片文件大小，单位字节B", example = "1024", required = true)
    private Integer shardSize;

    @ApiModelProperty(value = "文件索引", example = "1", required = true)
    private Integer shardIndex;

    @ApiModelProperty(value = "分片的总大小", example = "20", required = true)
    private Integer shardTotal;

    @ApiModelProperty(value = "文件key", example = "32位的md5", required = true)
    private String fileKey;
}
